﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="managedpath.aspx.cs" Inherits="SharePointHNSC.ApplicationPages.managedpath" MasterPageFile="~/_admin/admin.master" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="AdminControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint.ApplicationPages.Administration" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/15/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/15/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/15/ButtonSection.ascx" %>

<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:SharePointHNSC.spadmin, managedpath_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
    <img class="logo" src="/_layouts/15/images/SharePointHNSC/Logo.jpg" alt="HSNC Logo"/><SharePoint:EncodedLiteral runat="server" text="<%$Resources:SharePointHNSC.spadmin, managedpath_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>

<asp:content contentplaceholderid="PlaceHolderPageDescription" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:SharePointHNSC.spadmin, managedpath_pagedescription%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
</asp:content>

<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">

    <style>
        .logo{
            vertical-align:middle;
            padding:0px 25px 0px 10px;
        }
    </style>

<script type="text/javascript">
// <![CDATA[
function ULSfjj(){var o=new Object;o.ULSTeamName="Microsoft SharePoint Foundation";o.ULSFileName="scprefix.aspx";return o;}
	function DelInclusionClick()
	{ULSfjj:;
		for (i = 0; i < document.forms[0].elements.length; i++)
		{
			if (document.forms[0].elements[i].type == 'checkbox' &&
				document.forms[0].elements[i].getAttribute("name") == 'CkInclusionToDelete' &&
				document.forms[0].elements[i].checked)
			{
				return true;
			}
		}
		return false;
	}
	function CheckUrl()
	{ULSfjj:;
		var strVsUrl = (document.getElementById("<%= HidVirtualServerUrl.ClientID %>")).value;
		var strPrefix = (document.getElementById("<%= TxtPathName.ClientID %>")).value;
		strPrefix = escapeProperlyCore(strPrefix, true);
		var len = strVsUrl.length;
		var strUrl;
		if(strVsUrl.charAt(len-1) == '/')
		{
			if(strPrefix == "")
				strUrl = strVsUrl;
			else if (strPrefix.charAt(0) == '/')
				strUrl = strVsUrl + strPrefix.substr(1);
			else
				strUrl = strVsUrl + strPrefix;
		}
		else
		{
			if(strPrefix == "")
				strUrl = strVsUrl;
			else if (strPrefix.charAt(0) == '/')
				strUrl = strVsUrl + strPrefix;
			else
				strUrl = strVsUrl + "/" + strPrefix;
		}
		window.open(strUrl);
	}
// ]]>
 </script>
</asp:content>

<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
  <table width="100%" class="propertysheet" cellspacing="0" cellpadding="0" border="0"> <tr> <td class="ms-descriptionText"> <asp:Label ID="LabelMessage" Runat="server" EnableViewState="False" class="ms-descriptionText"/> </td> </tr> <tr> <td class="ms-error"><asp:Label ID="LabelErrorMessage" Runat="server" EnableViewState="False" /></td> </tr> <tr> <td class="ms-descriptionText"> <asp:ValidationSummary ID="ValSummary" HeaderText="<%$SPHtmlEncodedResources:spadmin, ValidationSummaryHeaderText%>" DisplayMode="BulletList" ShowSummary="True" runat="server"> </asp:ValidationSummary> </td> </tr> </table>
  <input type="hidden" id="HidVirtualServerUrl" runat="server">
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<!-- Inclusions -->
	<wssuc:InputFormSection
		Title="<%$Resources:spadmin, scprefix_inclusions%>"
		Description="<%$Resources:spadmin, scprefix_incinstruct%>"
		runat="server">
		<Template_InputFormControls>
			<tr><td>
			<img alt="" src="/_layouts/15/images/delitem.gif?rev=23" border="0">
			<asp:LinkButton ID="BtnDeleteInclusion"
				OnClick="BtnDeleteInclusion_Click"
				CausesValidation="False"
				Text="<%$SPHtmlEncodedResources:spadmin, scprefix_remselpath%>"
				Runat="server" title="<%$SPHtmlEncodedResources:spadmin, scprefix_remincpath%>" />
			</td></tr>
			<tr>
			   <td>
				<SharePoint:SPGridView
					Id="GvInclusions"
					runat="server"
					EmptyDataText="<%$Resources:spadmin, scprefix_noinc%>"
					CssClass="ms-propertysheet"
					AutoGenerateColumns="False">
					<Columns>
						<asp:TemplateField>
							<HeaderStyle CssClass="ms-menutoolbar" />
							<ItemStyle Width="10%" />
							<ItemTemplate>
								<input name="CkInclusionToDelete" id="<%# SPHttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Id").ToString()) %>"type="checkbox" value="<%# SPHttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Inclusion").ToString()) %>" >
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="<%$SPHtmlEncodedResources:spadmin, scprefix_pathhead%>">
							<HeaderStyle CssClass="ms-menutoolbar" />
							<ItemTemplate>
								<label for="<%# SPHttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Id").ToString()) %>" ><%# SPHttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "PathName").ToString()) %></label>
							</ItemTemplate>
						</asp:TemplateField>
						<asp:TemplateField HeaderText="<%$SPHtmlEncodedResources:spadmin, scprefix_typehead%>">
							<HeaderStyle CssClass="ms-menutoolbar" />
							<ItemTemplate>
								<%# SPHttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Comment").ToString()) %>
							</ItemTemplate>
						</asp:TemplateField>
					</Columns>
				</SharePoint:SPGridView>
			  </td></tr>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<!-- Add New -->
	<wssuc:InputFormSection
		Title="<%$Resources:spadmin, scprefix_addnew%>"
		runat="server">
		<Template_Description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, scprefix_addnewinstruct%>" EncodeMethod='HtmlEncode'/>
			<br /><br />
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, scprefix_addnewbesure%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
		</Template_Description>
		<Template_InputFormControls>
			<wssuc:InputFormControl runat="server"
				LabelText="<%$Resources:spadmin, scprefix_pathname%>">
				<Template_Control>
					<wssawc:InputFormTextBox title="<%$Resources:spadmin, scprefix_pathtextbox%>" CssClass="ms-input" ID="TxtPathName" Columns="35" Runat="server" MaxLength=55 Direction="LeftToRight" />
					<wssawc:InputFormRequiredFieldValidator ID="ReqValPathName"
						ControlToValidate="TxtPathName"
						ErrorMessage="<%$Resources:spadmin, scprefix_missingpath%>" Runat="server" />
					<wssawc:UrlPathValidator
						ID="CusValPathName"
						ControlToValidate="TxtPathName"
						ErrorMessage="<%$Resources:spadmin, scprefix_errpath%>"
						runat="server" />
					<br /><br />
					<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, scprefix_pathnamenote%>" EncodeMethod='HtmlEncode'/>
				</Template_Control>
			</wssuc:InputFormControl>
			 <wssuc:InputFormControl runat="server"
				LabelText="<%$Resources:spadmin, scprefix_type%>"
				LabelAssociatedControlId="DdlInclude" >
				<Template_Control>
					<asp:PlaceHolder id="PanelInclusionOptions" runat="server">
					   <asp:DropDownList id="DdlInclude" runat="server">
						<asp:ListItem value="1" selected="true" text="<%$Resources:spadmin, scprefix_wildinc%>" />
						<asp:ListItem value="0" text="<%$Resources:spadmin, scprefix_expinc%>" />
					   </asp:DropDownList>
					</asp:PlaceHolder>
				</Template_Control>
			</wssuc:InputFormControl>
			<wssuc:InputFormControl runat="server">
				<Template_Control>
					<asp:Button runat="server" Id="AddPath" OnClick="BtnAdd_Click" Text="<%$Resources:spadmin, scprefix_addpath%>" class="ms-ButtonHeightWidth" />
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
	<tr>
		<td height="10px" class="ms-descriptiontext" colspan="2"><img src="/_layouts/15/images/blank.gif?rev=23" width='1' height='10' alt="" /></td>
	</tr>
	<tr>
		<td colspan="2">
			<table cellpadding="0" cellspacing="0" width="100%">
				<colgroup>
					<col width="99%" />
					<col width="1%" />
				</colgroup>
				<tr>
					<td>&#160;</td>
					<td nowrap="nowrap"><asp:Button runat="server" Text="<%$Resources:spadmin, multipages_okbutton_text%>" onclick="BtnDone_Click" RequireValidation="false" class="ms-ButtonHeightWidth" CausesValidation="False" /></td>
				</tr>
			</table>
		</td>
	</tr>
  </table>
</asp:content>